package com.starter.es.service;


import com.starter.es.common.QueryCommand;
import com.starter.es.common.RangeQuery;
import com.starter.es.common.ResultData;

public interface AggsService {

  /**
   * 词条聚集
   *
   * @param content
   * @return
   * @throws Exception
   */
  ResultData termsAggs(QueryCommand content) throws Exception;

  /**
   * 范围聚集
   *
   * @param content
   * @return
   * @throws Exception
   */
  ResultData rangeAggs(RangeQuery content) throws Exception;

  /**
   * 直方图聚集
   *
   * @param content
   * @return
   * @throws Exception
   */
  ResultData histogramAggs(QueryCommand content) throws Exception;

  /**
   * 日期直方图聚集
   *
   * @param content
   * @return
   * @throws Exception
   */
  ResultData datehistogramAggs(QueryCommand content) throws Exception;

  /**
   * 嵌套对象词条聚集
   *
   * @return
   * @throws Exception
   */
  ResultData nestedTermsAggs() throws Exception;
}
